<template>
  <div>
    <menuHeader></menuHeader>
      <div class="store-detail" :class="{'go-up': needUp}">
        <div class="store-logo">
          <img :src="store.logoUrl" v-if="store.logoUrl"> <img src="../images/default_logo.png" v-if="!store.logoUrl"> &nbsp;&nbsp;{{store.storeName}}
        </div>

        <div class="address-phone">
          <div class="row split-line">
            <i class="icon-x icon-x14"></i>&nbsp;{{store.storeAddress}}
          </div>

          <div class="row">
            <i class="icon-x icon-x15"></i>&nbsp;{{store.phone}}
          </div>
        </div>

        <div class="businesstime-intro">
          <div class="row split-line">
            <p class="float-left">营业时间:</p>
            <p class="float-right col999">{{store.startTime}}-{{store.stopTime}}</p>
          </div>

          <div class="intro">
             <p>门店介绍: {{store.storeDesc}}</p>
          </div>
        </div>

      </div>

  </div>
</template>

<script>
    import menuHeader from '../components/menuHeader.vue'
    const SUCCESS = 200;
    export default {
      data() {
          let storeId = window.localStorage.getItem('storeId');
          console.log("storeId------:"+storeId)
          return {
            storeId:storeId,
            store:{},
            needUp:true,
          }
        },
        activated() {
          const _this = this;
          this.$http.get(
          '/fastfood/selectStoreDetailsInfo?storeId='+_this.storeId,
          ).then((response) => {
            if(response.data.code == SUCCESS){
               console.log("请求门店成功!");
               console.log(response.data.model);
               _this.store = response.data.model;
            }
          });

          let discount = window.localStorage.getItem('discount');
          if(discount != null && discount != "" && discount != undefined){
            this.needUp = false;
          }

        },
       components: {
          menuHeader
       }
    };
</script>

<style lang="less" scoped>

.go-up {
   padding-top: 100px!important;
}

.store-detail {
    padding-top: 120px;

    .store-logo {
      background: white;
      padding: 0 15px;
      height: 92px;
      line-height: 92px;

       img {
        height: 60px;
        width: 60px;
        vertical-align: middle;
      }
    }

    .row {
      height: 40px;
      line-height: 40px;
      padding: 0 10px;
      background: white;
      position: relative;
    }

    .address-phone {
      margin-top: 15px;
    }

    .split-line:after {
      content: " ";
      position: absolute;
      left: 15px;
      bottom: 0;
      width: 100%;
      border-bottom: 1px solid #BCBAB6;
      color: #BCBAB6;
      -webkit-transform-origin:0 100%;
      transform-origin:0 100%;
      -webkit-transform: scaleY(0.5);
      transform: scaleY(0.5);
    }

    .businesstime-intro {
      margin-top: 15px;
    }

    .intro {
      background: white;
      padding: 15px 10px 30px;
      line-height: 23px;
      text-align: justify;
    }
}

</style>